home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
001-010
/
amok01
/
fish
/
fishstart.mod
< prev
next >
Wrap
Text File
|
1993-11-04
|
2KB
|
91 lines
IMPLEMENTATION MODULE FishStart;
FROM SYSTEM IMPORT ADDRESS,ADR;
FROM Intuition IMPORT NewScreen,NewWindow,ScreenPtr,WindowPtr,IDCMPFlagSet,
WindowFlagSet,OpenScreen,CloseScreen,OpenWindow,CloseWindow,
customScreen,ViewAddress,IDCMPFlags,WindowFlags,
ScreenFlags,ScreenFlagSet;
FROM Graphics IMPORT ViewPtr,BitMapPtr,ViewPortPtr,RastPortPtr,ViewModes,
ViewModeSet;
CONST
DEPTH = 3;
(*
VAR
myscreen : ScreenPtr;
window : WindowPtr;
rp : RastPortPtr;
vp : ViewPortPtr;
view : ViewPtr;
*)
PROCEDURE startgfx(x,y,Height,Width,nbitPlaness: INTEGER;
palette: ADDRESS; s: ADDRESS;
Flags: WindowFlagSet; sbitmap: BitMapPtr);
VAR
(* i,j : register; ??? *)
idcmp : IDCMPFlagSet;
nw : NewWindow;
ns : NewScreen;
BEGIN
(* intuition direct comunication message port *)
idcmp := IDCMPFlagSet{closeWindow,refreshWindow};
WITH ns DO
leftEdge := 0;
topEdge := 0;
width := 320;
height := 200;
depth := DEPTH;
detailPen := 255;
blockPen := 255;
viewModes := ViewModeSet{};
type := customScreen;
font := NIL;
defaultTitle := NIL;
gadgets := NIL;
END;
myscreen := OpenScreen(ns);
IF myscreen = NIL THEN HALT END;
WITH nw DO
leftEdge := x;
topEdge := y;
width := Width;
height := Height;
detailPen := 255;
blockPen := 255;
idcmpFlags := idcmp;
flags := WindowFlagSet{windowDepth,windowSizing,windowDrag,windowClose} + Flags;
firstGadget := NIL;
checkMark := NIL;
title := s;
screen := NIL;
bitMap := sbitmap;
minWidth := 80;
minHeight := 16;
maxWidth := 640;
maxHeight := 200;
type := ScreenFlagSet{wbenchScreen};
END;
window := OpenWindow(nw);
view := ViewAddress();
rp := ADR(myscreen^.rastPort);
vp := ADR(myscreen^.viewPort);
END startgfx;
PROCEDURE endgfx();
BEGIN
CloseWindow(window);
CloseScreen(myscreen);
END endgfx;
END FishStart.